<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input class="inp" type="text" value="全栈开发">
    <input class="inp2" type="text" value="2104C">
    <button onclick="btn()">传参</button>
</body>

</html>
<script>
    var inp = document.querySelector(".inp")
    var inp2 = document.querySelector(".inp2")
    function btn() {
        alert(inp.value)
        alert(inp2.value)
    }
</script>